package com.yqkj.zysoft.upms.entity.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;

/**
 * @author GreatorMan.cool
 * @copyright: Copyright (c) 2020
 * @company: 扬起科技有限公司
 * @date 2021/9/8 21:27
 * @description: 用户管理
 */
@Data
public class FrameWorkUserUpdateRequest implements Serializable {
    /**
     * 用户ID
     */
    @NotNull(message = "id不能为空!")
    private Long id;
    /**
     * 邮箱
     */
//    @Pattern(regexp = "/^(\\w)+(\\.\\w+)*@(\\w)+((\\.\\w+)+)$/", message = "邮件非法")
    private String email;

    /**
     * 手机号
     */
    @Pattern(regexp = "^1\\d{10}$", message = "手机号非法")
    private String mobile;

    /**
     * 昵称
     */
    @Length(message = "昵称不能超过{max}个字符长度", max = 64)
    private String nickName;

    /**
     * 性别
     */
    @NotNull(message = "性别不能为空")
    private Integer sex;


    @NotBlank(message = "用户姓名不能为空")
    private String username;
    /**
     * 工作职称
     */
    private String job;
    /**
     * 生日
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthDay;


}
